package com.chixing.day03;

public class StudentTest {
    public static void main(String[] args) {
        /*
         *1. new:创建对象,开辟一块堆内存
         *2. 构造函数:初始化对象
         */
        Student st1 = new Student();
        st1.setStuId(101);
        st1.setStuName("Jason Marslyon");
        System.out.println(st1.getStuName());
        System.out.println(st1.getStuId());

        //有参构造函数
        Student st2 = new Student(102, "Jason Mark");
        System.out.println(st2.getStuId());
        System.out.println(st2.getStuName());
    }
}
